<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var name = "window"
        var obj = {
            name:"javascript",
            sayName(){
                console.log(this.name);
            },
            wait(){
                console.log(this.name);//javascript
                setTimeout(function(){
                    console.log(this.name);
                })
            },
            delay(){
                setTimeout(()=>{
                    console.log(this.name);
                })
            },
            layOut(){
                setTimeout(function(){
                    console.log(this.name);
                }.bind(this))
            },
            print(){
                var that = this;
                setTimeout(function(){
                    console.log(this.name);
                }.bind(that))
            }
        }
        obj.sayName();//javascript
        obj.wait();//window
        obj.delay();//javascript
        obj.layOut();//javascript
        obj.print();//javascript
    </script>
</body>
</html>